package cn.it.hbtt.daoimg;

import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;

import cn.it.hbtt.dao.BaseDAO;
/**
 * 
 * @author 永恒
 *删除购物车商品
 */
public class Dropimg {
	public void dropimg(String showid) {
		try {
			
			BaseDAO base=new BaseDAO();
			Connection conn=base.getConnection();
			
			Statement stm = conn.createStatement();
			ResultSet rs = stm.executeQuery("select * from easybuy_buycar");
		
				String sql = "DELETE FROM `easybuy_buycar` WHERE `showId`="+showid;
				PreparedStatement ps = conn.prepareStatement(sql);
			
				// 执行sql语句
	            ps.executeUpdate();
	            // 关闭数据库连接对象
				conn.close();

		}catch (Exception e) {
			// TODO: handle exception
		}
	}
}
